﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/MainContent.Master"
    Inherits="System.Web.Mvc.ViewPage<IEnumerable<MShop.Core.Domain.MenuPage>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    菜单管理
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <form method="post">
    <div id="fullBox">
        <div class="tabListBoxHead">
            <div style="float: left; padding-top: 3px;">
            </div>
            <div style="float: right;">
                <%=Html.ActionLink("返回", "index", "menu")%>
            </div>
        </div>
        <div>
            <div class="tabListBox">
                <table id="ETList" cellpadding="0" cellspacing="0">
                    <thead>
                        <tr>
                            <th>
                                菜单
                            </th>
                            <th>
                                地址
                            </th>
                            <th>
                                行为
                            </th>
                            <th>
                                控制器
                            </th>
                            <th>
                                区域
                            </th>
                            <th>
                                操作
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                                控制器
                                <input type="text" name="controller" />
                            </td>
                            <td>
                                行为<input type="text" name="action" />
                            </td>
                            <td>
                                区域<input type="text" name="area" />
                            </td>
                            <td>
                                <input type="submit" class="btn" value="提交" />
                            </td>
                        </tr>
                        <% foreach (var item in Model)
                           { %>
                        <tr>
                            <td>
                                <%: item.Menu.Name %>
                            </td>
                            <td>
                                <%: item.Url %>
                            </td>
                            <td>
                                <%: item.Controller %>
                            </td>
                            <td>
                                <%: item.Action %>
                            </td>
                            <td>
                                <%: item.Area %>
                            </td>
                            <td>
                                <%: Html.ActionLink("删除", "Delete", new { id=item.Id })%>
                            </td>
                        </tr>
                        <% } %>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    </form>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMeta" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            var windowWidth = $("#fullBox").width();
            var windowHeight = $("#fullBox").height() - 30;
            $('.tabListBox').css({ 'width': windowWidth + 'px', 'height': windowHeight + 'px' });
            $(window).resize(function () {
                var windowWidth = $("#fullBox").width();
                var windowHeight = $("#fullBox").height() - 30;
                $('.tabListBox').css({ 'width': windowWidth + 'px', 'height': windowHeight + 'px' });
            });
            $('.tabListBox').fixedHeaderTable({ footer: false, cloneHeaderToFooter: false, autoResize: true, fixCol1: true });

            $('.tabListBox').find("tbody").find("tr").each(function (i) {
                if (i % 2 == 1) {
                    $(this).find("td").addClass("tr1");
                }
            });
            $('.tabListBox').find("tbody").find("tr").mouseover(function (i) {
                $(this).find("td").addClass("tr0");
            });
            $('.tabListBox').find("tbody").find("tr").mouseout(function (i) {
                $(this).find("td").removeClass("tr0");
            });

        });
    </script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphFooter" runat="server">
</asp:Content>
